//
//  TFCourseModeLive.swift
//  TalkfunSDKDemo
//
//  Created by 莫瑞权 on 2022/5/19.
//  Copyright © 2022 Talkfun. All rights reserved.
//

import UIKit

   //课件模式

public class TFCourseModeLive: UIViewController {

    @objc let videoArea = TF1to16VideoArea()
    @objc let drawing = TF1to16Drawing()
    @objc let video1to1Arae = TFVideoArea1to1()

    public override func viewDidLoad() {
        super.viewDidLoad()
        self.addDrawing()

        // Do any additional setup after loading the view.
    }
    

    //1对1视频区域
   @objc func addVideoArea1to1()
    {
        let videoAreaHeight:CGFloat = self.view.frame.size.height
        var videoAreaWidth:CGFloat  = 158
        
        if (UIDevice.current.userInterfaceIdiom == .pad)
           {
            videoAreaWidth = 184 ;
               
           }
        let videoAreaY:CGFloat = 0

        let videoAreaX:CGFloat = self.view.frame.size.width - videoAreaWidth

//        self.video1to1Arae = [[TFVideoArea1to1 alloc]init];
        
        self.video1to1Arae.frame = CGRect(x: videoAreaX, y: videoAreaY, width: videoAreaWidth, height: videoAreaHeight)
     
       
        self.video1to1Arae.backgroundColor = UIColor(red: 19/255.0, green: 21/255.0, blue: 25/255.0, alpha: 1)
        
        self.view.addSubview(self.video1to1Arae)
        
    }

    //2.视频区域
   @objc func addvideoArea()
    {
        var videoAreaHeight:CGFloat = 80+8
        var videoAreaWidth:CGFloat  = 0.0
        let  videoAreaY:CGFloat = 0.0
        //ipad
        if (UIDevice.current.userInterfaceIdiom == .pad){
            videoAreaHeight = 139+10
            
        }
         videoAreaWidth =  self.view.frame.size.width
   
        
        let videoAreaX:CGFloat = 0
        

        self.videoArea.isHidden = true
        self.videoArea.frame = CGRect(x: videoAreaX, y: videoAreaY, width: videoAreaWidth, height: videoAreaHeight)
        
        self.videoArea.backgroundColor = UIColor(red: 19/255.0, green: 21/255.0, blue: 25/255.0, alpha: 1)
  
        self.view.addSubview(self.videoArea)
        

    }

    //5.画板
    @objc func addDrawing()
    {
     
        self.drawing.backgroundColor = self.view.backgroundColor
      
        self.view.addSubview(self.drawing)
       
    }


}
